package com.dyrj.ysk.service;

import com.dyrj.ysk.exception.BizException;

import java.util.Map;

/**
 * 加签验签服务
 * @author 吴侠志  2019/10/18
 * @version 1.0
 */
public interface SignService {

    /**
     * 签名
     * @param params
     * @param privateKey
     * @return
     */
    String sign(Map<String,String>params,String privateKey) throws BizException;

    /**
     * 验签
     * @param params
     * @param sign
     * @param publicKey
     * @return
     */
    boolean verify(Map<String,String> params,String sign,String publicKey) throws BizException;
}
